<%@ page pageEncoding="UTF-8"%>

<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-nested" prefix="nested"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/tags/trymore" prefix="tm"%>

<script type="text/javascript">
	$(function(){
		$.each($("textarea", $("#formDef")), function(){
			$(this).html($(this).text().replace(/<br\/>/g,"\n"));
		});
	});
</script>

<div class="pageContent">
	<form method="post" action="app/flow/def/index.do?action=actionSaveFlowDef" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);" id="formDef">
		<div class="pageFormContent" layoutH="56">
			<table cellspacing="10" cellpadding="10" class="dform">
				<tr>
					<td>模板名称：</td>
					<td><input name="defName" type="text" size="30" value="${entity ne null ? entity.defName : ''}" class="required" style="width: 88%" /></td>
				</tr>
				<tr>
					<td style="vertical-align: top;">模板描述：</td>
					<td>
						<textarea rows="2" cols="40" name="defDescription" class="textInput" style="width: 88%">${entity ne null ? entity.defDescription : ''}</textarea>
					</td>
				</tr>
				<tr>
					<td>运作状态：</td>
					<td>
						<select class="combox required" name="defApplied" id="dialog_defStatus">
							<option value="0" ${entity ne null && entity.defApplied eq 0 ? 'selected' : ''}>暂不运作</option>
							<option value="1" ${entity ne null && entity.defApplied eq 1 ? 'selected' : ''}>正常运作</option>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="2" align="right"><span style="color:#AA0009; margin-top: 5px;display:inline-block;">注意：系统默认为新增模板创建`初审`和`复审`环节...</span></td>
				</tr>
			</table>
		</div>
		<div class="formBar">
			<ul>
				<li>
					<div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div>
				</li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
		<input type="hidden" name="id" value="${entity ne null ? entity.id : '-1'}" />
	</form>
<div>